package com.mapforge.map.tools.undo.tilelayeredit;

import com.mapforge.map.TileLayer;

/** */
public class TileLayerZDepthEdit extends AbstractTileLayerEdit {

	/** */
	private int zdepth;

	/** */
	public TileLayerZDepthEdit(int oldDepth, TileLayer layer) {
		super(null, "Z-depth", layer);
		this.zdepth = oldDepth;
	}

	@Override
	public void redo() {
		int temp = getTileLayer().getZ();
		this.getTileLayer().setZ(zdepth);
		zdepth = temp;
	}

	@Override
	public void undo() {
		int temp = getTileLayer().getZ();
		this.getTileLayer().setZ(zdepth);
		zdepth = temp;
	}

	@Override
	public void die() {
		// TODO Auto-generated method stub

	}
}
